// 客服导入
export const ServersThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  {
    title: '企业名称',
    key: 'customerName',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '流水号',
    key: 'orderNo',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '创建人',
    key: 'createdName',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '创建时间',
    key: 'createdOn',
    minWidth: 200,
    tooltip: true,
    render: (h, params) => {
      let row = params.row
      let times = ''
      if (row.createdOn) {
        times = row.createdOn.slice(0, 19).replace(/T/g, ' ')
      }
      return h('span', times)
    }
  },
  {
    title: '状态',
    key: 'exportCount',
    minWidth: 200,
    tooltip: true,
    render: (h, params) => {
      const text = params.row.exportCount > 0 ? '已导出' : '未导出'
      return h('span', text)
    }
  },
  {
    title: '操作',
    key: 'action',
    slot: 'action',
    width: 240
  }
]

// 客服导入明细
export const ServersDetailsThead = [
  {
    type: 'selection',
    minWidth: 60,
    align: 'center'
  },
  {
    title: '企业名称',
    key: 'customerName',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '流水号',
    key: 'orderNo',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '姓名',
    key: 'name',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '手机号码',
    key: 'phone',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '开户行',
    key: 'bankName',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '银行卡卡号',
    key: 'accountNo',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '订单单价',
    key: 'orderPrice',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '订单量',
    key: 'orderCount',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '结算金额',
    key: 'settlementAmount',
    minWidth: 200,
    tooltip: true
  },
  {
    title: '订单完成时间',
    key: 'completeDate',
    minWidth: 200,
    tooltip: true,
    render: (h, params) => {
      let row = params.row
      let times = ''
      if (row.completeDate) {
        times = row.completeDate.slice(0, 10).replace(/T/g, ' ')
      }
      return h('span', times)
    }
  },
  {
    title: '入职日期',
    key: 'onBoardingDate',
    minWidth: 200,
    tooltip: true,
    render: (h, params) => {
      let row = params.row
      let times = ''
      if (row.onBoardingDate) {
        times = row.onBoardingDate.slice(0, 10).replace(/T/g, ' ')
      }
      return h('span', times)
    }
  },
  {
    title: '状态',
    key: 'exportCount',
    minWidth: 200,
    tooltip: true,
    render: (h, params) => {
      const text = params.row.exportCount > 0 ? '已导出' : '未导出'
      return h('span', text)
    }
  }
]
